package br.com.stourados.perfil.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.Hyperlink;

public class wdgtFeito extends Composite {
	private Image image_2,image_3;
//	private PopupPanel imagePopup; 
	private DialogBox imagePopup;
	
	
	public wdgtFeito() {
		VerticalPanel verticalPanel = new VerticalPanel();
		initWidget(verticalPanel);
		verticalPanel.setHeight("161px");
		
		HorizontalPanel horizontalPanel_2 = new HorizontalPanel();
		verticalPanel.add(horizontalPanel_2);
		horizontalPanel_2.setWidth("418px");
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel_2.add(horizontalPanel);
		horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
		horizontalPanel.setSize("158px", "49px");
		
		Image image = new Image("img/Koala.jpg");
		horizontalPanel.add(image);
		image.setSize("73px", "78px");
		
		HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
		horizontalPanel_2.add(horizontalPanel_1);
		horizontalPanel_1.setWidth("218px");
			    
			    ScrollPanel scrollPanel = new ScrollPanel();
			    horizontalPanel_1.add(scrollPanel);
			    scrollPanel.setSize("267px", "87px");
			    	    
			    	    HorizontalPanel horizontalPanel_3 = new HorizontalPanel();
			    	    horizontalPanel_3.setSpacing(5);
			    	    scrollPanel.setWidget(horizontalPanel_3);
			    	    horizontalPanel_3.setSize("248px", "60px");
			    	    
			    	    	    image_2 = new Image("img/chapado.jpg");
			    	    	    horizontalPanel_3.add(image_2);
			    	    	    image_2.setSize("77px", "57px");
			    	    	    
			    	    	    Image image_1 = new Image("img/chapado.jpg");
			    	    	    horizontalPanel_3.add(image_1);
			    	    	    image_1.setSize("73px", "57px");
					    	    image_1.addClickHandler(new ClickHandler() {
					    	    	public void onClick(ClickEvent event) {
					    	    		imagePopup.center();
					    	    	}
					    	    });
			    	    	    
			    	    	    Image image_6 = new Image("img/chapado.jpg");
			    	    	    horizontalPanel_3.add(image_6);
			    	    	    image_6.setSize("73px", "57px");
					    	    image_6.addClickHandler(new ClickHandler() {
					    	    	public void onClick(ClickEvent event) {
					    	    		imagePopup.center();
					    	    	}
					    	    });
			    	    
			    	    image_2.addClickHandler(new ClickHandler() {
			    	    	public void onClick(ClickEvent event) {
			    	    		imagePopup.center();
			    	    	}
			    	    });
		
		Label lblNewLabel = new Label("Coala conta: ");
		verticalPanel.add(lblNewLabel);
		lblNewLabel.setWidth("170px");
		
		TextArea txtrUmaVezEle = new TextArea();
		txtrUmaVezEle.setText("Uma vez ele dan\u00E7ou que nem o maicon jackson");
		verticalPanel.add(txtrUmaVezEle);
		txtrUmaVezEle.setSize("420px", "89px");
		
		Hyperlink hprlnkNewHyperlink = new Hyperlink("Comentarios(6)", false, "newHistoryToken");
		verticalPanel.add(hprlnkNewHyperlink);
	    image_3 = new Image("img/chapado.jpg");
	    image_3.setSize("500px", "500px");
	    
	    // Create a popup to show the full size image
	    // imagePopup = new PopupPanel(true);
	    imagePopup = new DialogBox(true);
	    imagePopup.setAnimationEnabled(true);
	    imagePopup.setGlassEnabled(true);
	    imagePopup.setWidget(image_3);
	    
	    image_3.addClickHandler(new ClickHandler() {
	    	public void onClick(ClickEvent event) {
	    		imagePopup.hide();
	    	}
	    });

	}
}
